package com.leanyuan.publi.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leanyuan.publi.domain.Userinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leanyuan.publi.dto.UserInfoDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
public interface UserinfoMapper extends BaseMapper<Userinfo> {
    @Results(id="base",value={
            @Result(property = "tAdmin.username",column = "aname")
    })
    @SelectProvider(type = com.leanyuan.publi.dyno.UserInfoDynaSqlProvider.class,method = "selectUserInfoSql")
    List<Userinfo> findAll(@Param("dto") UserInfoDto userInfoDto,@Param("page") Page<Userinfo> page);
}